import java.util.concurrent.*;

public class Test {
    public static ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(9, 17, 5, TimeUnit.MINUTES, new LinkedBlockingQueue<>(), Executors.defaultThreadFactory(), new ThreadPoolExecutor.AbortPolicy());

    public static void main(String[] args) {
        /*int i = Runtime.getRuntime().availableProcessors();
        System.out.println(i);*/
        for(int i = 0;i < 9;i++){
            poolExecutor.execute(() -> {
                System.out.println("执行了任务:"+Thread.currentThread().getId());
            });
        }
    }
}
